﻿using Management.API.DTOs.Management;
using Management.Errorcode;
using Management.Models.BOMBasicInformation;
using Management.Domain;
using MediatR; 
using Management.API.Utils;

namespace Management.API.Application.Controller.Management
{ 

    /// <summary>
    /// 查询全部 无条件     
    /// </summary>
    public class GetBasicInformationCommand : IRequest<ApiResult<PagingResult<IList<GetBasicInformationDTO>>>>
    {
        /// <summary>
        /// 当前页
        /// </summary>
        public int PageIndex { get; set; }

        /// <summary>
        /// 页容量
        /// </summary>
        public int PageSize { get; set; }
        /// <summary>
        /// 物料
        /// </summary>
        public int MaterialTypeId { get; set; }
    }


    /// <summary>
    /// 添加  参数
    /// </summary>
    public class AddBasicInformationCommand : IRequest<ApiResult>
    {
        /// <summary>
        /// BOM编号
        /// </summary>
        public string BomNumber { get; set; }

        /// <summary>
        /// 编号状态
        /// </summary>
        public bool BomNumberingState { get; set; }

        /// <summary>
        /// 版本号
        /// </summary>
        public string BomVersionNumber { get; set; }

        /// <summary>
        /// 规格型号
        /// </summary>
        public string BomSpecificationModel { get; set; }

        /// <summary>
        /// 默认BOM
        /// </summary>
        public bool BomDefault { get; set; }

        /// <summary>
        /// 日产量
        /// </summary>
        public string BomDailyOutput { get; set; }

        /// <summary>
        /// 备注
        /// </summary>
        public string BomRemark { get; set; }

        /// <summary>
        /// 使用量
        /// </summary>
        public string BomUsageAmount { get; set; }

        /// <summary>
        /// 用料比例
        /// </summary>
        public string BomRatioMaterialsUsed { get; set; }

        /// <summary>
        /// 工艺路线名称
        /// </summary>
        public string BomNameProcessRoute { get; set; }

        /// <summary>
        /// 工艺路线编号
        /// </summary>
        public string BomProcessNumber { get; set; }

        /// <summary>
        /// 工艺路线说明
        /// </summary>
        public string BomProcessSpecification { get; set; }

        /// <summary>
        /// 单位
        /// </summary>
        public string UnitName { get; set; }

        /// <summary>
        /// 单位
        /// </summary>
        public int UnitId { get; set; }

        /// <summary>
        /// 物料
        /// </summary>
        public int MaterialTypeId { get; set; }

        /// <summary>
        /// 产品
        /// </summary>
        public int ProductTypeId { get; set; }
    }
   

    /// <summary>
    /// ID查询
    /// </summary>
    public class GetIDBasicInformationCommand : IRequest<ApiResult<PagingResult<GetBasicInformationCommand>>>
    {
        public int BasicinformationId { get;  set; }
        /// <summary>
        /// 物料
        /// </summary>
        public int MaterialTypeId { get; set; }
        /// <summary>
        /// 当前页
        /// </summary>
        public int PageIndex { get; set; }

        /// <summary>
        /// 页容量
        /// </summary>
        public int PageSize { get; set; }
    }

    //批量添加
    public class AddUsersBasicInformationCommand : IRequest<ApiResult>
    {
        public List<GetBasicInformationDTO> BasicInformation { get; set; }
    }

    //删除
    public class DeleteBasicInformationCommand : IRequest<ApiResult>
    {
        public int BasicinformationId { get; set; }
    }

    //修改
    public class UpdateBasicInformationCommand : IRequest<ApiResult>
    {
        public int BasicinformationId { get; set; }

        /// <summary>
        /// BOM编号
        /// </summary>
        public string BomNumber { get; set; }

        /// <summary>
        /// 编号状态
        /// </summary>
        public bool BomNumberingState { get; set; }

        /// <summary>
        /// 版本号
        /// </summary>
        public string BomVersionNumber { get; set; }

        /// <summary>
        /// 规格型号
        /// </summary>
        public string BomSpecificationModel { get; set; }

        /// <summary>
        /// 默认BOM
        /// </summary>
        public bool BomDefault { get; set; }

        /// <summary>
        /// 日产量
        /// </summary>
        public string BomDailyOutput { get; set; }

        /// <summary>
        /// 备注
        /// </summary>
        public string BomRemark { get; set; }

        /// <summary>
        /// 使用量
        /// </summary>
        public string BomUsageAmount { get; set; }

        /// <summary>
        /// 用料比例
        /// </summary>
        public string BomRatioMaterialsUsed { get; set; }

        /// <summary>
        /// 工艺路线名称
        /// </summary>
        public string BomNameProcessRoute { get; set; }

        /// <summary>
        /// 工艺路线编号
        /// </summary>
        public string BomProcessNumber { get; set; }

        /// <summary>
        /// 工艺路线说明
        /// </summary>
        public string BomProcessSpecification { get; set; }

        /// <summary>
        /// 单位
        /// </summary>
        public string UnitName { get; set; }

        /// <summary>
        /// 单位
        /// </summary>
        public int UnitId { get; set; }

        /// <summary>
        /// 物料
        /// </summary>
        public int MaterialTypeId { get; set; }

        /// <summary>
        /// 产品
        /// </summary>
        public int ProductTypeId { get; set; }

    }
   
 

}
